package com.gt.web.srv.enums;

import lombok.Getter;

/**
 * <p>
 * UseEnum
 * </p>
 *
 * @author: WeiHuan
 * @version:1.0
 * @date: 2024/6/1 10:16
 * 注意：本内容仅限于公司内部传阅，禁止外泄以及用于其他的商业目的
 */
@Getter
public enum UseEnum {
	NO_USE(0,"待使用"),
	USED(1,"已使用"),
	CANCEL(2,"已取消"),
	;

	private Integer status;
	private String desc;

	UseEnum(Integer status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public static UseEnum findByType( Integer type) {
		UseEnum current = null;
		for (UseEnum value : UseEnum.values()) {
			if (value.getStatus().equals(type)) {
				current = value;
				break;
			}
		}
		return current;
	}
}
